//https://leetcode.cn/problems/valid-palindrome/

class Solution {
public:
    bool isPalindrome(string s) {
        string temp;
        int i = 0;
        while (i < s.size())
        {
            if (isupper(s[i]))
            {
                temp += (s[i] + 32);
            }
            else if (islower(s[i]) || (s[i] >= '0' && s[i] <= '9'))
            {
                temp += s[i];
            }
            i++;

        }
        i = 0;
        int end = temp.size() - 1;
        while (end >= 0)
        {
            if (temp[end] != temp[i])
                return false;

            end--;
            i++;
        }

        return true;

    }
};

